<%-- 
    Document   : newLink
    Created on : 7/08/2014, 06:21:42 PM
    Author     : eocandos
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"   
    prefix="c" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>New Link</title>
    </head>
    <body>
        <h2>New Link</h2>
        <form action="DB" method="post">
            <center><table border="1">
                    <tr>
                        <td>Name</td><td><input type="text" name="name" size="38" value="As"></td>
                    </tr>
                    <tr>
                        <td>Url</td><td><input type="text" name="url" size="38" value="as.com"></td>
                    </tr>
                    <tr>
                        <td>Position</td><td><input type="text" name="pos" size="38" value="5"></td>
                    </tr>
                    <tr>
                        <td>Tags</td><td><input type="text" name="tags" size="38" value="sport, futbol"></td>
                    </tr>
                    <tr>
                        <td>Description</td>
                        <td>
                            <textarea rows="4" cols="30" name="desc" 
                                      >Mundo del deporte</textarea>                                               
                        </td>
                    </tr>
                    <tr><td><input type="submit" value="SaveNew" name="clicked"></td></tr> 
                </table>   </center> <br>
        </form>

        <table border="1">
            <c:forEach  var="view" items="${links}"> 
                <tr>           
                    <td>${view.name}</td>
                    <td>${view.url} </td>                     
                    <td>${view.date}</td>
                    <td>${view.des} </td>  
                    <td>${view.pos} </td>
                </tr> 
            </c:forEach> 
        </table>
    </body>
</html>
